﻿using MS.Common;
using Newtonsoft.Json;
using Prism.Commands;
using Prism.Events;
using Prism.Ioc;
using Prism.Regions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using wpf.Triage.DataModel;

namespace wpf.Triage.ViewModels
{
    
    public class TestViewModel : VmBase
    {
        private string _ComText ;
        public string ComText
        {
            get
            {
                return _ComText;
            }
            set
            {
                _ComText = value;
                RaisePropertyChanged(nameof(ComText));
            }
        }

        public DelegateCommand<object> SaveCommand { get; private set; }
        public TestViewModel(IContainerExtension container, IEventAggregator eventAggregator, IRegionManager regionManager) : base(container, eventAggregator, regionManager)
        {
            this.SaveCommand = new DelegateCommand<object>(OnSave);
            ComText = "默认值";
        }

        private void OnSave(object obj)
        {
            MessageBox.Show(ComText);
        }
    }
}
